package com.example.myapplication.di

import com.example.myapplication.data.repository.StorageItemRepository
import com.example.myapplication.data.repository.StorageItemRepositoryImpl
import com.example.myapplication.data.repository.StorageSpaceRepository
import com.example.myapplication.data.repository.StorageSpaceRepositoryImpl
import dagger.Binds
import dagger.Module
import dagger.hilt.InstallIn
import dagger.hilt.components.SingletonComponent
import javax.inject.Singleton

/**
 * Repository依赖注入模块
 */
@Module
@InstallIn(SingletonComponent::class)
abstract class RepositoryModule {
    
    /**
     * 绑定StorageSpaceRepository实现
     */
    @Binds
    @Singleton
    abstract fun bindStorageSpaceRepository(
        storageSpaceRepositoryImpl: StorageSpaceRepositoryImpl
    ): StorageSpaceRepository
    
    /**
     * 绑定StorageItemRepository实现
     */
    @Binds
    @Singleton
    abstract fun bindStorageItemRepository(
        storageItemRepositoryImpl: StorageItemRepositoryImpl
    ): StorageItemRepository
} 